package com.demo.io;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author gy
 * @date 2022/2/15
 */
public class Test {
    public static void main(String[] args) {
        List<Integer> li = Arrays.asList(1, 2, 3);
//        printListObject(li);
        printListWildCard(li);
    }


    public static void printListObject(List<Object> list) {
        for (Object element : list) {
            System.out.print(element + " ");
        }
    }

    public static void printListWildCard(List<?> list) {
        for (Object element: list) {
            System.out.print(element + " ");
        }
    }

}
